package com.qfedu.fmmall.orderAdd.controller;

import com.qfedu.fmmall.entity.Orders;
import com.qfedu.fmmall.orderAdd.service.OrderAddService;
import com.qfedu.fmmall.vo.ShoppingCartVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author : yanBin
 * @date :2022/2/10 14:19
 */
@RestController
@RequestMapping("/order")
public class OrderAddController {

    @Autowired
    private OrderAddService orderAddService;

    @PostMapping("/save")
    public List<ShoppingCartVO> saveOrder(@RequestBody Orders orders, String cids ) {
        System.out.println("=====================================order-add服务");
        return orderAddService.saveOrder(orders,cids);
    }
}
